<form id="form-gdpr" method="post" data-oc-toggle="ajax" data-oc-load="{{ action }}" data-oc-target="#gdpr">
  <div class="table-responsive">
    <table class="table table-bordered table-hover">
      <thead>
        <tr>
          <td class="text-center" style="width: 1px;"><input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', $(this).prop('checked'));" class="form-check-input"/></td>
          <td class="text-start">{{ column_email }}</td>
          <td class="text-start">{{ column_request }}</td>
          <td class="text-start">{{ column_status }}</td>
          <td class="text-start d-none d-lg-table-cell">{{ column_date_added }}</td>
          <td class="text-end">{{ column_action }}</td>
        </tr>
      </thead>
      <tbody>
        {% if gdprs %}
          {% for gdpr in gdprs %}
            <tr>
              <td class="text-center"><input type="checkbox" name="selected[]" value="{{ gdpr.gdpr_id }}" class="form-check-input"/></td>
              <td class="text-start">
                {% if gdpr.edit %}
                  <a href="{{ gdpr.edit }}">{{ gdpr.email }}</a>
                {% else %}
                  {{ gdpr.email }}
                {% endif %}</td>
              <td class="text-start">{{ gdpr.action }}</td>
              <td class="text-start">
                {% if gdpr.status == '-1' %}
                  <span class="badge bg-danger">{{ text_denied }}</span>
                {% elseif gdpr.status == '0' %}
                  <span class="badge bg-secondary">{{ text_unverified }}</span>
                {% elseif gdpr.status == '1' %}
                  <span class="badge bg-warning">{{ text_pending }}</span>
                {% elseif gdpr.status == '2' %}
                  <span class="badge bg-info">{{ text_processing }}</span>
                {% elseif gdpr.status == '3' %}
                  <span class="badge bg-success">{{ text_complete }}</span>
                {% endif %}</td>
              <td class="text-start d-none d-lg-table-cell">{{ gdpr.date_added }}</td>
              <td class="text-end text-nowrap"><button type="button" value="{{ gdpr.approve }}" data-bs-toggle="tooltip" title="{{ text_approve }}" class="btn btn-success"><i class="fa-solid fa-check"></i></button>
                <button type="button" value="{{ gdpr.deny }}" data-bs-toggle="tooltip" title="{{ text_deny }}" class="btn btn-warning"><i class="fa-solid fa-circle-xmark"></i></button>
                <button type="button" value="{{ gdpr.delete }}" data-bs-toggle="tooltip" title="{{ text_delete }}" class="btn btn-danger"><i class="fa-regular fa-trash-can"></i></button></td>
            </tr>
          {% endfor %}
        {% else %}
          <tr>
            <td class="text-center" colspan="6">{{ text_no_results }}</td>
          </tr>
        {% endif %}
      </tbody>
    </table>
  </div>
  <div class="row">
    <div class="col-sm-6 text-start">{{ pagination }}</div>
    <div class="col-sm-6 text-end">{{ results }}</div>
  </div>
</form>
